-- GENERATED SPELL FOR [Dark Rune Giant] --


function spell0_27969(pUnit, Event) --@Iron Fist,Self--
pUnit:FullCastSpellOnTarget(51494,pUnit)
pUnit:RegisterEvent('Sorts_27969', 32000, 1)
end

function spell1_27969(pUnit, Event) --@Stomp,n/a--
pUnit:FullCastSpellOnTarget(51493,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_27969', 624, 1)
end

function spell2_27969(pUnit, Event) --@Stomp,n/a--
pUnit:FullCastSpellOnTarget(59026,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_27969', 615, 1)
end

function Sorts_27969(pUnit, Event)
local choix_sorts_27969 = math.random(0, 2)
if choix_sorts_27969 == 0 then
pUnit:RegisterEvent('spell0_27969', 1, 1)
end
if choix_sorts_27969 == 1 then
pUnit:RegisterEvent('spell1_27969', 1, 1)
end
if choix_sorts_27969 == 2 then
pUnit:RegisterEvent('spell2_27969', 1, 1)
end
end

function mob27969_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_27969', math.random(1500, 3000), 1)
end

function mob27969_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob27969_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob27969_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(27969, 1, 'mob27969_Action')
RegisterUnitEvent(27969, 2, 'mob27969_Leave')
RegisterUnitEvent(27969, 3, 'mob27969_Kill')
RegisterUnitEvent(27969, 4, 'mob27969_Die')
